using System;
using System.Collections;

namespace Com.CMS263.PO
{
	#region Question

	/// <summary>
	/// Question object for NHibernate mapped table 'Question'.
	/// </summary>
	public class Question
	{
		#region Member Variables
		
		protected int _id;
		protected int _userId;
		protected string _userName;
		
		protected string _contents;
		protected DateTime _addDate;
		protected string _reContents;
		protected DateTime _reAddDate;
		protected bool _isRead;
		protected bool _state;

		#endregion

		#region Constructors

		public Question() { }

		public Question( int userId, string userName, string contents, DateTime addDate, string reContents, DateTime reAddDate, bool isRead, bool state )
		{
			this._userId = userId;
			this._userName = userName;
			
			this._contents = contents;
			this._addDate = addDate;
			this._reContents = reContents;
			this._reAddDate = reAddDate;
			this._isRead = isRead;
			this._state = state;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual int UserId
		{
			get { return _userId; }
			set { _userId = value; }
		}

		public  virtual string UserName
		{
			get { return _userName; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for UserName", value, value.ToString());
				_userName = value;
			}
		}

		public  virtual string Contents
		{
			get { return _contents; }
			set
			{
				if ( value != null && value.Length > 2000)
					throw new ArgumentOutOfRangeException("Invalid value for Contents", value, value.ToString());
				_contents = value;
			}
		}

		public  virtual DateTime AddDate
		{
			get { return _addDate; }
			set { _addDate = value; }
		}

		public  virtual string ReContents
		{
			get { return _reContents; }
			set
			{
				if ( value != null && value.Length > 2000)
					throw new ArgumentOutOfRangeException("Invalid value for ReContents", value, value.ToString());
				_reContents = value;
			}
		}

		public  virtual DateTime ReAddDate
		{
			get { return _reAddDate; }
			set { _reAddDate = value; }
		}

		public  virtual bool IsRead
		{
			get { return _isRead; }
			set { _isRead = value; }
		}

		public  virtual bool State
		{
			get { return _state; }
			set { _state = value; }
		}

		

		#endregion
	}
	#endregion
}